package VUTHANHPHUC_HOMEWORK_ARRAY;

public class Models02 {
	public static int average(int[] array, int n) {
		int result = 0;
		int tbc = 0;
		for (int i = 0; i < n; i++) {
			result = result + array[i];
			tbc = result / n;
		}
		return tbc;

	}

	public static double average(double[] array, int n) {
		double result = 0;
		double tbc = 0;
		for (int i = 0; i < n; i++) {
			result = result + array[i];
			tbc = result / n;
		}
		return tbc;
	}

}
